/*
 * @Author: jhw
 * @Date: 2025-08-12 14:14:25
 * @LastEditors: jhw
 * @LastEditTime: 2025-08-15 10:05:19
 * @Description:
 */
import noteDescDefaultStatus from './defaultStatus/NoteDesc';
import type { Status, TypeStatus } from '@/types';

// 编辑组件
import {
  ColorEditor,
  DescEditor,
  ItalicEditor,
  PositionEditor,
  SizeEditor,
  NoteDescTypeEditor,
  TitleEditor,
  WeightEditor,
} from '@/components/SurveyComs/EditItems/index';
import { v4 as uuidv4 } from 'uuid';
import { markRaw } from 'vue';

export const initEditor = () =>
  [
    Object.assign({}, noteDescDefaultStatus(), {
      status: <TypeStatus>{
        type: {
          id: uuidv4(),
          currentStatus: 0,
          status: ['标题', '段落'],
          isShow: true,
          name: 'note-desc-type-editor',
          editCom: markRaw(NoteDescTypeEditor),
        },
        title: {
          id: uuidv4(),
          status: '问卷标题!!',
          isShow: true,
          name: 'title-editor',
          editCom: markRaw(TitleEditor),
        },
        desc: {
          id: uuidv4(),
          status: '组件默认描述默认描述内容默认描述内容',
          isShow: false,
          name: 'desc-editor',
          editCom: markRaw(DescEditor),
        },
        position: {
          id: uuidv4(),
          currentStatus: 0,
          status: ['左对齐', '居中对齐'],
          isShow: false,
          name: 'position-editor',
          editCom: markRaw(PositionEditor),
        },
        titleSize: {
          id: uuidv4(),
          currentStatus: 0,
          status: ['22', '20', '18'],
          isShow: true,
          name: 'size-editor',
          showName: '标题尺寸',
          editCom: markRaw(SizeEditor),
        },
        descSize: {
          id: uuidv4(),
          currentStatus: 0,
          status: ['16', '14', '12'],
          isShow: false,
          name: 'size-editor',
          showName: '描述尺寸',
          editCom: markRaw(SizeEditor),
        },
        titleWeight: {
          id: uuidv4(),
          currentStatus: 1,
          status: ['加粗', '正常'],
          isShow: true,
          name: 'weight-editor',
          showName: '标题粗细',
          editCom: markRaw(WeightEditor),
        },
        descWeight: {
          id: uuidv4(),
          currentStatus: 1,
          status: ['加粗', '正常'],
          isShow: false,
          name: 'weight-editor',
          showName: '描述粗细',
          editCom: markRaw(WeightEditor),
        },
        titleItalic: {
          id: uuidv4(),
          currentStatus: 1,
          status: ['斜体', '正常'],
          isShow: true,
          name: 'italic-editor',
          showName: '标题斜体',
          editCom: markRaw(ItalicEditor),
        },
        descItalic: {
          id: uuidv4(),
          currentStatus: 1,
          status: ['斜体', '正常'],
          isShow: false,
          name: 'italic-editor',
          showName: '描述斜体',
          editCom: markRaw(ItalicEditor),
        },
        titleColor: {
          id: uuidv4(),
          status: '#000',
          isShow: true,
          name: 'color-editor',
          showName: '标题颜色',
          editCom: markRaw(ColorEditor),
        },
        descColor: {
          id: uuidv4(),
          status: '#909399',
          isShow: false,
          name: 'color-editor',
          showName: '描述颜色',
          editCom: markRaw(ColorEditor),
        },
      },
    }),
    Object.assign({}, noteDescDefaultStatus(), {
      status: <TypeStatus>{
        type: {
          id: uuidv4(),
          currentStatus: 1,
          status: ['标题', '段落'],
          isShow: true,
          editCom: markRaw(NoteDescTypeEditor),
          name: 'text-type-editor',
        },
        title: {
          id: uuidv4(),
          status: '默认标题内容',
          isShow: false,
          editCom: markRaw(TitleEditor),
          name: 'title-editor',
        },
        desc: {
          id: uuidv4(),
          status:
            '为了给您提供更好的服务，希望您能抽出几分钟时间，将您的感受和建议告诉我们，我们非常重视每位用户的宝贵意见，期待您的参与！现在我们就马上开始吧！',
          isShow: true,
          editCom: markRaw(DescEditor),
          showName: '问卷描述',
          name: 'desc-editor',
        },
        position: {
          id: uuidv4(),
          currentStatus: 0,
          status: ['左对齐', '居中对齐'],
          isShow: true,
          editCom: markRaw(PositionEditor),
          name: 'position-editor',
        },
        titleSize: {
          id: uuidv4(),
          currentStatus: 0,
          status: ['26', '24', '22'],
          isShow: false,
          editCom: markRaw(SizeEditor),
          name: 'size-editor',
          showName: '标题尺寸',
        },
        descSize: {
          id: uuidv4(),
          currentStatus: 0,
          status: ['16', '14', '12'],
          isShow: true,
          editCom: markRaw(SizeEditor),
          name: 'size-editor',
          showName: '描述尺寸',
        },
        titleWeight: {
          id: uuidv4(),
          currentStatus: 1,
          status: ['加粗', '正常'],
          isShow: false,
          editCom: markRaw(WeightEditor),
          name: 'weight-editor',
          showName: '标题粗细',
        },
        descWeight: {
          id: uuidv4(),
          currentStatus: 1,
          status: ['加粗', '正常'],
          isShow: true,
          editCom: markRaw(WeightEditor),
          name: 'weight-editor',
          showName: '描述粗细',
        },
        titleItalic: {
          id: uuidv4(),
          currentStatus: 1,
          status: ['斜体', '正常'],
          isShow: false,
          editCom: markRaw(ItalicEditor),
          name: 'italic-editor',
          showName: '标题斜体',
        },
        descItalic: {
          id: uuidv4(),
          currentStatus: 1,
          status: ['斜体', '正常'],
          isShow: true,
          editCom: markRaw(ItalicEditor),
          name: 'italic-editor',
          showName: '描述斜体',
        },
        titleColor: {
          id: uuidv4(),
          status: '#000',
          isShow: false,
          editCom: markRaw(ColorEditor),
          name: 'color-editor',
          showName: '标题颜色',
        },
        descColor: {
          id: uuidv4(),
          status: '#909399',
          isShow: true,
          editCom: markRaw(ColorEditor),
          name: 'color-editor',
          showName: '描述颜色',
        },
      },
    }),
  ] as unknown as Status[];
